<!DOCTYPE html><html lang="zh-Hans"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"><meta name="description" content="huluo的技术博客"><meta name="keywords" content=""><meta name="author" content="kyren"><meta name="copyright" content="kyren"><title>Stay hungry, stay foolish | Kyren's Blog</title><link rel="shortcut icon" href="/melody-favicon.ico"><link rel="stylesheet" href="/css/index.css?version=1.9.0"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@latest/css/font-awesome.min.css?version=1.9.0"><meta name="format-detection" content="telephone=no"><meta http-equiv="x-dns-prefetch-control" content="on"><link rel="dns-prefetch" href="https://cdn.jsdelivr.net"><link rel="dns-prefetch" href="https://hm.baidu.com"><script>var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?cf87fcdbd9ab7cf93d894f7c219ae78f";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();</script><meta http-equiv="Cache-Control" content="no-transform"><meta http-equiv="Cache-Control" content="no-siteapp"><script src="https://v1.hitokoto.cn/?encode=js&amp;charset=utf-8&amp;select=.footer_custom_text" defer></script><script>var GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容:${query}"}},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  hexoVersion: '6.2.0'
} </script><meta name="generator" content="Hexo 6.2.0"></head><body><i class="fa fa-arrow-right" id="toggle-sidebar" aria-hidden="true"></i><div id="sidebar" data-display="false"><div class="author-info"><div class="author-info__avatar text-center"><img src="https://avatars.githubusercontent.com/u/5827823?v=4"></div><div class="author-info__name text-center">kyren</div><div class="author-info__description text-center">huluo的技术博客</div><div class="follow-button"><a target="_blank" rel="noopener" href="https://github.com/huluo666">Follow Me</a></div><hr><div class="author-info-articles"><a class="author-info-articles__archives article-meta" href="/archives"><span class="pull-left">文章</span><span class="pull-right">239</span></a><a class="author-info-articles__tags article-meta" href="/tags"><span class="pull-left">标签</span><span class="pull-right">41</span></a><a class="author-info-articles__categories article-meta" href="/categories"><span class="pull-left">分类</span><span class="pull-right">29</span></a></div><hr><div class="author-info-links"><div class="author-info-links__title text-center">Links</div><a class="author-info-links__name text-center" target="_blank" rel="noopener" href="http://192.168.2.212:9090/">Jira</a><a class="author-info-links__name text-center" target="_blank" rel="noopener" href="http://192.168.2.212:8090/">Confluence</a><a class="author-info-links__name text-center" target="_blank" rel="noopener" href="http://bloc.leniugame.com/">Leniu</a></div></div></div><nav class="no-bg" id="nav"><div id="page-header"><span class="pull-left"> <a id="site-name" href="/">Kyren's Blog</a></span><i class="fa fa-bars toggle-menu pull-right" aria-hidden="true"></i><span class="pull-right menus">   <a class="site-page" href="/">主页</a><a class="site-page" href="/essay">随笔</a><a class="site-page" href="/archives">归档</a><a class="site-page" href="/tags">标签</a><a class="site-page" href="/categories">分类</a><a class="site-page" href="/about">关于</a></span><span class="pull-right"><a class="site-page social-icon search"><i class="fa fa-search"></i><span> 搜索</span></a></span></div><div id="site-info"><div id="site-title">Kyren's Blog</div><div id="site-sub-title">Stay hungry, stay foolish</div><div id="site-social-icons"><a class="social-icon" href="https://github.com/huluo666" target="_blank" rel="noreferrer noopener nofollow"><i class="fa-github fa"></i></a></div></div></nav><div id="content-outer"><div class="layout" id="content-inner"><div class="recent-post-item article-container"><a class="article-title" href="/2016/10/01/iOS%20%E5%B8%B8%E7%94%A8%E8%AE%A1%E7%AE%97/">iOS常用计算</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2016-10-01</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/iOS/">iOS</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/iOS/">iOS</a></span><div class="content">How to calculate a point with an given center, angle and radius?
iOS: derive angle of tap point given a circle
1#define   DEGREES_TO_RADIANS(degrees)  ...</div><a class="more" href="/2016/10/01/iOS%20%E5%B8%B8%E7%94%A8%E8%AE%A1%E7%AE%97/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2016/09/30/iOS%20%E6%89%8B%E5%8A%BF%E4%B9%8B%E6%BB%91%E5%8A%A8%E6%B8%85%E5%B1%8F%E7%AD%89/">iOS 手势之滑动清屏等</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2016-09-30</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/iOS/">iOS</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/iOS/">iOS</a></span><div class="content">translationInView:（获取当前拖拽位置）translationInView 返回父视图系统当中，返回横坐标，纵坐标上拖动了多少像素
可以判断拖动方向
123CGPoint translantion = [UIPanGestureRecognizer translationInView ...</div><a class="more" href="/2016/09/30/iOS%20%E6%89%8B%E5%8A%BF%E4%B9%8B%E6%BB%91%E5%8A%A8%E6%B8%85%E5%B1%8F%E7%AD%89/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2016/09/28/Java%E5%AD%A6%E4%B9%A0%20%E7%B1%BB%E5%9E%8B%E8%BD%AC%E6%8D%A2%E4%B8%8E%E8%BF%90%E7%AE%97%2002/">Java学习 类型转换与运算 02</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2016-09-28</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/Java/">Java</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/Java/">Java</a></span><div class="content">1234567891011121314151617181920212223242526class Untitled &#123;	public static void main(String[] args) &#123;		System.out.println(&quot;hello world&q ...</div><a class="more" href="/2016/09/28/Java%E5%AD%A6%E4%B9%A0%20%E7%B1%BB%E5%9E%8B%E8%BD%AC%E6%8D%A2%E4%B8%8E%E8%BF%90%E7%AE%97%2002/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2016/09/23/java%E8%AF%AD%E6%B3%95%E5%AD%A6%E4%B9%A0%201/">java语法学习 1</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2016-09-23</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/Java/">Java</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/java/">java</a></span><div class="content">学习来源：http://www.weixueyuan.net/java/rumen_1/
创建Test.java 文件
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495 ...</div><a class="more" href="/2016/09/23/java%E8%AF%AD%E6%B3%95%E5%AD%A6%E4%B9%A0%201/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2016/09/04/iOS%E4%B8%8B%E6%8B%89%E5%88%B7%E6%96%B0%EF%BC%8C%E4%B8%8A%E6%8B%89%E5%8A%A0%E8%BD%BD/">下拉刷新—上拉加载Github记录</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2016-09-04</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/%E6%AD%A3%E5%88%99/">正则</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/%E6%AD%A3%E5%88%99/">正则</a></span><div class="content">下拉刷新—上拉加载 开源记录
KVO
https://github.com/coderyi/YiRefresh
https://www.jianshu.com/p/21837c99100e
https://www.jianshu.com/p/ed228f8a5c3c
https://www.jian ...</div><a class="more" href="/2016/09/04/iOS%E4%B8%8B%E6%8B%89%E5%88%B7%E6%96%B0%EF%BC%8C%E4%B8%8A%E6%8B%89%E5%8A%A0%E8%BD%BD/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2016/09/04/iOS%E7%9B%B4%E6%92%AD%20%E7%BE%8E%E9%A2%9C/">iOS直播-美颜</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2016-09-04</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/%E7%9B%B4%E6%92%AD/">直播</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/%E7%9B%B4%E6%92%AD/">直播</a></span><div class="content"><p>直播美颜</p></div><a class="more" href="/2016/09/04/iOS%E7%9B%B4%E6%92%AD%20%E7%BE%8E%E9%A2%9C/#more">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2016/09/04/%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F/">正则表达式</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2016-09-04</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/%E6%AD%A3%E5%88%99/">正则</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/%E6%AD%A3%E5%88%99/">正则</a></span><div class="content">微博，朋友圈常用正则匹配
12345678匹配粗体中括号间的内容（也带上两边的粗体中括号）【[^】]+】匹配粗体中括号间的内容（不带两边的粗体中括号）的正则表达式：(?&lt;=【)([^】]+)(?=】)匹配书名号之间的内容（不带两边的书名号）的正则表达式：(?&lt;=《)([^》]+)(?=》 ...</div><a class="more" href="/2016/09/04/%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2016/08/15/iOS%E5%AE%9E%E7%8E%B0%E6%A8%A1%E7%B3%8A%E6%95%88%E6%9E%9C/">iOS  模糊效果实现方式</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2016-08-15</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/iOS/">iOS</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/iOS/">iOS</a></span><div class="content">4种方式实现iOS模糊效果
CoreImage中的模糊滤镜

UIImage + ImageEffects的category模糊效果

iOS8中UIVisualEffectView模糊效果

iOS7以后通过UIToolBar实现模糊效果
http://blog.wangruofeng007.co ...</div><a class="more" href="/2016/08/15/iOS%E5%AE%9E%E7%8E%B0%E6%A8%A1%E7%B3%8A%E6%95%88%E6%9E%9C/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2016/08/10/iOS%20%E8%87%AA%E5%AE%9A%E4%B9%89NSLog/">iOS 自定义NSLog</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2016-08-10</time><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/iOS/">iOS</a></span><div class="content">宏定义、NSLog我们经常用到，但系统默认的NSLog往往不能满足我们开发的需求。譬如以下开发常见自定义NSLog就可以帮助我们获取更多的相关信息。
1、自定义NSLog代码示例12345#ifdef DEBUG#define NSLog(fmt, ...) NSLog((@&quot;%s [Li ...</div><a class="more" href="/2016/08/10/iOS%20%E8%87%AA%E5%AE%9A%E4%B9%89NSLog/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2016/06/14/iOS%E5%BC%80%E5%8F%91%20Xcode%E9%AB%98%E7%BA%A7%E8%B0%83%E8%AF%95/">iOS开发 Xcode高级调试</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2016-06-14</time><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/iOS/">iOS</a></span><div class="content">第三方库
PonyDebugger
通过Chrom浏览器可以监控网络，还可以查看Core Data对象，view的层级查看
PS：在从App Store上下载Xcode后，默认是不会安装Command Line Tools的，Command Line Tools是在Xcode中的一款工具，可以在命令 ...</div><a class="more" href="/2016/06/14/iOS%E5%BC%80%E5%8F%91%20Xcode%E9%AB%98%E7%BA%A7%E8%B0%83%E8%AF%95/#more" style="margin-top: 14px">阅读更多</a><hr></div><nav id="pagination"><div class="pagination"><a class="extend prev" rel="prev" href="/page/15/"><i class="fa fa-chevron-left"></i></a><a class="page-number" href="/">1</a><span class="space">&hellip;</span><a class="page-number" href="/page/15/">15</a><span class="page-number current">16</span><a class="page-number" href="/page/17/">17</a><span class="space">&hellip;</span><a class="page-number" href="/page/24/">24</a><a class="extend next" rel="next" href="/page/17/"><i class="fa fa-chevron-right"></i></a></div></nav></div></div><footer><div class="layout" id="footer"><div class="copyright">&copy;2022 By kyren</div><div class="framework-info"><span>驱动 - </span><a target="_blank" rel="noopener" href="http://hexo.io"><span>Hexo</span></a><span class="footer-separator">|</span><span>主题 - </span><a target="_blank" rel="noopener" href="https://github.com/Molunerfinn/hexo-theme-melody"><span>Melody</span></a></div><div class="footer_custom_text">hitokoto</div><div class="busuanzi"><script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><span id="busuanzi_container_site_uv"><i class="fa fa-user"></i><span id="busuanzi_value_site_uv"></span><span></span></span><span class="footer-separator">|</span><span id="busuanzi_container_site_pv"><i class="fa fa-eye"></i><span id="busuanzi_value_site_pv"></span><span></span></span></div></div></footer><i class="fa fa-arrow-up" id="go-up" aria-hidden="true"></i><script src="https://cdn.jsdelivr.net/npm/animejs@latest/lib/anime.min.js"></script><script src="https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-animate@latest/velocity.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-ui-pack@latest/velocity.ui.min.js"></script><script src="/js/utils.js?version=1.9.0"></script><script src="/js/fancybox.js?version=1.9.0"></script><script src="/js/sidebar.js?version=1.9.0"></script><script src="/js/copy.js?version=1.9.0"></script><script src="/js/fireworks.js?version=1.9.0"></script><script src="/js/transition.js?version=1.9.0"></script><script src="/js/scroll.js?version=1.9.0"></script><script src="/js/head.js?version=1.9.0"></script><script src="/js/search/local-search.js"></script><script>if(/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) {
  $('#nav').addClass('is-mobile')
  $('footer').addClass('is-mobile')
  $('#top-container').addClass('is-mobile')
}</script><div class="search-dialog" id="local-search"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章"></div></div></div><hr><div id="local-search-results"><div id="local-hits"></div><div id="local-stats"><div class="local-search-stats__hr" id="hr"><span>由</span> <a target="_blank" rel="noopener" href="https://github.com/wzpan/hexo-generator-search" style="color:#49B1F5;">hexo-generator-search</a>
 <span>提供支持</span></div></div></div><span class="search-close-button"><i class="fa fa-times"></i></span></div><div class="search-mask"></div></body></html>